package com.jk.garden1.controller;

import com.jk.garden1.entity.VisitantEntity;
import com.jk.garden1.service.VisitantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 到访管理表
 */
@RestController
@RequestMapping("visitant")
public class VisitantController {
    @Autowired
    private VisitantService visitantService;
    /**
     * 查询全部
     */
    @RequestMapping("selectList")
    public List<VisitantEntity>selectList(VisitantEntity visitantEntity){

        return visitantService.selectList(visitantEntity);
    }
    /**
     * 新增临时到访
     */
    @RequestMapping("addVisitant")
    public void addVisitant(VisitantEntity visitantEntity){
        visitantService.addVisitant(visitantEntity);
    }
    /**
     * 签退
     */
    @RequestMapping("delAndAdd")
    public void delAndAdd(Integer id){
        visitantService.delAndAdd(id);
    }
    /**
     * es高亮
     */
    @RequestMapping("selectListes")
    public List<VisitantEntity>selectListes(VisitantEntity visitantEntity){

        return visitantService.selectListes(visitantEntity);
    }
    /**
     * 查询正在访问人数
     */
    @RequestMapping("findcount")
    public List<VisitantEntity>findcount(VisitantEntity visitantEntity) {

        return visitantService.findcount(visitantEntity);
    }
    /**
     *
     * 扫一扫添加到访
     */
    @RequestMapping("addVisitantList")
    public void addVisitantList(VisitantEntity visitantEntity){
        visitantService.addVisitantList(visitantEntity);
    }
    /**
     * 查询临时
     */
    @RequestMapping("findLinShi")
    public List<VisitantEntity>findLinShi(VisitantEntity visitantEntity) {

        return visitantService.findLinShi(visitantEntity);
    }
}
